<template>
  <div class="main-wrap">
    <el-button type="primary" @click="add('queryReply')">添加</el-button>
    <add-order ref="queryReply"
               :parentmsg="parentmsg"
               v-if="addOrderVisible"
               :visible.sync="addOrderVisible"></add-order>

    <div>
      <el-select  placeholder="请选择" style="width: 100%">
        <el-option v-for="item in tacheRouter" :key="item.code" :label="item.code+'--'+item.name"  :value="item.code"></el-option>
      </el-select>
    </div>
  </div>
</template>
<script>
  import Add from '@/components/NewForm.vue'
  import { tacheRouter } from '@/config/tacheRouter'
  export default {
    data(){
      return {
        addOrderVisible: false,
        parentmsg: {
          tradeCode : 'hongdaaaaaaaaaaaaaau'
        },
        tacheRouter : tacheRouter
      }
    },
    methods: {
      add(refForm){
        if(this.$refs[refForm]){
          this.$refs[refForm].initForm();
        }
        this.addOrderVisible= true;
      }
    },
    components: {
      'add-order': Add
    }
  }
</script>

<style>

</style>
